import React, { Component } from 'react'
import News from '../News'
import Message from '../Message'
import { Route } from 'react-router-dom'
import MyNavLink from '../../MyNavLink'
export default class Home extends Component {
    render() {
        return ( 
            <div class="panel">
                <div class="panel-body">
                    <h2>我是Home的内容</h2>
                    <div>
                        <ul className ="nav nav-pills">
                            <li>
                               <MyNavLink to="/home/news">新闻</MyNavLink>
                            </li>
                            <li>
                               <MyNavLink to="/home/message">信息</MyNavLink>
                            </li>
                        </ul>
                        <hr/>
                    </div>
                    <div>
                            <Route  path="/home/news" component={News} />
                            <Route  path="/home/message" component={Message} />
                    </div>
                </div>
            </div>
        )
    }
}
